set(CONNECTMANAGE_SOURCES
        wifimanager.h
        wifimanager.cpp
        usbmanage.h
        usbmanage.cpp
        connectionservice.h
        connectionservice.cpp
        messageserialize.pb.h
        messageserialize.pb.cc
        )
# find_package(QT NAMES Qt5 COMPONENTS Widgets Network LinguistTools QTcpServer REQUIRED)
# find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Network LinguistTools REQUIRED)


include_directories(
        /usr/include/x86_64-linux-gnu/qt5/QtCore/
        /usr/include/x86_64-linux-gnu/qt5/QtNetwork/
        ${CMAKE_CURRENT_SOURCE_DIR}/../common
        ${CMAKE_CURRENT_SOURCE_DIR}/../common/adb
        /usr/include/
        /usr/include/kysdk/kysdk-base/
        /usr/include/google/protobuf/
        )

add_library(connectmanage  ${CONNECTMANAGE_SOURCES})

find_package(PkgConfig REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Network)
pkg_check_modules(GLIB
        glib-2.0
        gobject-2.0
        gio-2.0
        protobuf
        )

target_include_directories(connectmanage PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(connectmanage PUBLIC ${GLIB_INCLUDE_DIRS})

target_link_libraries(connectmanage PUBLIC
        ${GLIB_LIBRARIES}
        common
        )
